package com.example.producer.controller;

import com.example.producer.interfaceDao.SendMessager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/prod")
public class TestController {
    @Autowired
    private SendMessager messager;

    @GetMapping("/send")
    public String send(@RequestParam("msg") String msg){
        System.out.println(msg);
        messager.sendMsg(msg);
        return "消息发送成功，消息是："+msg;
    }
}
